<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /**
     *定义函数实现向页面上输出表格的行数，列数作为函数的参数传入
     *完成函数的调用
     *createTable(6,6) 
     */
function createTable(a,b){
    var i=0;
    var j=0;
    document.write("<table border ='1' width ='400' height ='400'");
    while(i<a){
        document.write("<tr>");
        console.log("i值为:" +i);
        j=0;
        while(j<b){
            console.log("j值为:" +j);
            document.write("<td>");
            document.write("</td>");
            j++;

        }
        document.write("</tr>");
        i++;
    }
    document.write("<table>");
    return ture;
}
createTable(3,6);

var result = createTable(6,6);
console.log(result);

   
</script>
</html>